import Cookies from 'js-cookie'

const TokenKey = 'hrsaas-ihrm-token'
const TimeKey = 'hrsaas-timestamp-key'

// 获取token
export function getToken() {
  return Cookies.get(TokenKey)
}
// 存储token
export function setToken(token) {
  return Cookies.set(TokenKey, token)
}
// 删除token
export function removeToken() {
  return Cookies.remove(TokenKey)
}

// 获取事件戳
export function getTimeout() {
  return Cookies.get(TimeKey)
}
// 存储事件戳
export function setTimeout() {
  const data = new Date()
  const time = data.getTime()
  return Cookies.set(TimeKey, time)
}
